home *** CD-ROM | disk | FTP | other *** search
/ SPACE 1 / SPACE - Library 1 - Volume 1.iso / program / 441 / aessrc12 / aesappl1.s < prev    next >
Text File  |  1990-11-23  |  2KB  |  45 lines

  1.  
  2. ;*========================================================================
  3. ;*
  4. ;* AESFAST Public Domain GEM bindings.
  5. ;*
  6. ;*========================================================================
  7.  
  8.           .include  "aesfast.sh"
  9.           
  10. ;*************************************************************************
  11. ;*
  12. ;* Application manager functions 1 of 2.
  13. ;*
  14. ;*************************************************************************
  15.  
  16. ;-------------------------------------------------------------------------
  17. ; appl_init
  18. ; appl_exit
  19. ;-------------------------------------------------------------------------
  20.  
  21. _appl_init::
  22.           lea       aesblock,a0                 ; On an appl_init call we
  23.           move.l    a0,a1                       ; do a one-time set up of
  24.           moveq.l   #((SZ_AESBLK/2)-1),d0       ; the AES block.  This 
  25.           moveq.l   #0,d1                       ; block contains the control
  26. .clearloop:                                     ; and global arrays used by
  27.           move.w    d1,(a1)+                    ; the AES. Start by clearing
  28.           dbra      d0,.clearloop               ; the entire memory block.
  29.           
  30.           lea       control(a0),a1              ; Now get the offsets of the
  31.           move.l    a1,pcontrl(a0)              ; control & global arrays
  32.           lea       global(a0),a1               ; within the block, & store 
  33.           move.l    a1,pglobal(a0)              ; them in the aespb part.
  34.           
  35.           AControl  10,0,1,0                    ; Set up the appl_init call.
  36.           bra.s     appl_inout                  ; Continue at common code...
  37. _appl_exit::
  38.           AControl  19,0,1,0                    ; Set up the appl_exit call.
  39. appl_inout:
  40.           ACall     RET2USER                    ; Call AES, return to user.
  41.           
  42. ;         end of code
  43.  
  44.  
  45.